Addresses the active component so that its properties can be read and set. ThisComponent is used from document Basic, where it represents the document the Basic belongs to. The type of object accessed by ThisComponent depends on the document type.
属性の読み取りおよび設定ができるように、アクティブなコンポーネントのアドレスを指定します。 ThisComponent は、Basic が属するドキュメントを表すドキュメント Basic から使用します。 ThisComponent がアクセスするオブジェクトの種類は、ドキュメントの種類によって異なります。
ThisComponent
ThisComponent
Sub Main
Sub Main
REM updates the "Table of Contents" in a text doc
REM 文章ドキュメント上の「目次」の更新
Dim allindexes, index As Object
Dim allindexes, index As Object
allindexes = ThisComponent.getDocumentIndexes()
allindexes = ThisComponent.getDocumentIndexes()
index = allindexes.getByName("Table of Contents1")
index = allindexes.getByName("目次1")
REM use the default name for Table of Contents and a 1
REM 目次のデフォルト名を使用
index.update()
index.update()
End Sub
End Sub